package su.validator.param.check;

import org.springframework.stereotype.Component;

import su.validator.core.AbstractBusinessValidator;
import su.validator.core.ValidateErrorHandler;
import su.validator.param.SingleForm;

@Component
public class BizSingleFormCheck2 extends AbstractBusinessValidator<SingleForm> {


    public BizSingleFormCheck2() {
        super(SingleForm.class);
    }

    @Override
    public void validate(SingleForm singleForm, ValidateErrorHandler validateErrorHandler) {
        if (singleForm.getName().equals("江健2")) {
            validateErrorHandler.handleError("name", "不能是江健2CODE","江健2为系统管理员不能随意添加");
        }
    }
}
